package com.ruoyi.worker.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.handler.inter.IExcelDataModel;
import cn.afterturn.easypoi.handler.inter.IExcelModel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * 长期工导入模板
 *
 * @author by 刘松山
 * @Classname TermWorkerExcel
 * @since 2021/11/9 17:53
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class TermWorkerExcel extends BaseEntity implements IExcelModel, IExcelDataModel {

    /**
     * 错误信息
     */
    private String errorMsg;

    /**
     * 行号
     */
    private Integer rowNum;

    @Excel(name = "姓名")
    @NotBlank
    private String workerName;

    @Excel(name = "身份证号")
    @NotBlank
    private String idCard;

    @Excel(name = "联系电话")
    @NotBlank
    private String phoneCode;

    @Excel(name = "银行卡号")
    private String bankCardNumber;

    @Excel(name = "开户行")
    private String bankAddress;

    @Excel(name = "出生年月日")
    private String birthday;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "入职时间", importFormat = "yyyy-MM-dd")
    private Date comeTime;

    @Excel(name = "民族")
    private String nation;

    @Excel(name = "学历")
    private String education;

    @Excel(name = "招聘渠道")
    private String companyName;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "离职时间", importFormat = "yyyy-MM-dd")
    private Date leaveTime;

    @Excel(name = "家住地址")
    private String homeAddress;

    @Excel(name = "紧急联系人")
    private String emergencyContact;

    @Excel(name = "紧急联系电话")
    private String emergencyContactPhone;

    @Excel(name = "推荐人")
    private String recommender;

    @Excel(name = "员工状态", replace = {"0_离职", "1_在职"})
    @NotBlank
    private String workStatusName;

    @Excel(name = "班组")
    @NotBlank
    private String clazzName;

    @Excel(name = "区域")
    private String areaName;

    @Excel(name = "组别")
    @NotBlank
    private String groupName;

    @Excel(name = "岗位")
    @NotBlank
    private String postName;

    @Excel(name = "职级")
    private String professionInfo;

    @Excel(name = "备注")
    private String remark;


    //员工个人信息补充
    /**
     * 员工状态
     */
    private Integer workStatus;
    /**
     * 性别
     */
    private Integer sex;
    /**
     * 年龄
     */
    private Long age;

    //员工职场信息 ====开始====
    /**
     * 班组id
     */
    private String clazzId;

    /**
     * 区域id
     */
    private Long areaId;

    /**
     * 组别id
     */
    private Long groupId;

    /**
     * 岗位id
     */
    private Long postId;

    /**
     * 职级id
     */
    private Long professionId;

    /** 转正时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @com.ruoyi.common.annotation.Excel(name = "转正时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date regularTime;

    /** 薪资方式  0 班次*单价 1 计件制 */

    private Integer salaryMethod;

    /** 在职状态 0 试岗期 1 试用期  2 正式工 */

    private Integer jobStatus;

    /** 全勤奖 */
    @Excel(name = "全勤奖")
    private Long fullBonus;

    private Integer status;

    @Excel(name = "黑名单",replace = {"0_否", "1_是"})
    private String statusName;

    /** 薪资方式  0 班次*单价 1 计件制 */
    @Excel(name = "薪资方式" ,replace = {"0_班次*单价", "1_计件制"})
    private String salaryMethodName;

    /** 在职状态 0 试岗期 1 试用期  2 正式工 */
    @Excel(name = "在职状态",replace = {"0_试岗期", "1_试用期","3_正式工"})
    private String jobStatusName;

    //员工职场信息 ====结束====

}
